Skip to content

Improve JSKit diagnostics for use-after-free of JSClosure #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2022

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented May 16, 2022

The current JSKit’s diagnostics for use-after-free of JSClosure is unclear for developers to find which JSClosure is used.
To mitigate the debugging difficulties, JSKit should provide more information in diagnostics for use-after-free of JSClosure

Before

The function was already released
Unreachable code should not be executed

After

Error: The JSClosure was already released by Swift side. The closure is created at PrimaryTests/main.swift:247

@kateinoigakukun kateinoigakukun force-pushed the katei/closure-uaf-diags branch from 2c86c93 to c7a6669 Compare May 16, 2022 16:13
@github-actions
Copy link

github-actions bot commented May 16, 2022

Time Change: +217ms (1%)

Total Time: 17,357ms

View Unchanged
Test name Duration Change
Serialization/Write JavaScript number directly 387ms -7ms (1%)
Serialization/Write JavaScript string directly 429ms +0ms
Serialization/Swift Int to JavaScript 5,428ms +19ms (0%)
Serialization/Swift String to JavaScript 5,591ms +56ms (0%)
Object heap/Increment and decrement RC 5,522ms +150ms (2%)

To mitigate the debugging difficulties, JSKit should provide more information in diagnostics.
@kateinoigakukun kateinoigakukun force-pushed the katei/closure-uaf-diags branch from c7a6669 to d2556b4 Compare May 16, 2022 16:27
@kateinoigakukun kateinoigakukun requested a review from a team May 16, 2022 16:40
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kateinoigakukun kateinoigakukun merged commit df6651f into main May 17, 2022
@kateinoigakukun kateinoigakukun deleted the katei/closure-uaf-diags branch May 17, 2022 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants